import { CHANGE_INPUT, ADD_ITEM, DELETE_ITEM, STR_CHANGE, SLICE_CHANGE, ADD_SLICEX, ADD_SLICEY } from './actionTypes'

export const changeInputAction = (value) => ({
    type: CHANGE_INPUT,
    value
})
export const addItemAction = (value) => ({
    type: ADD_ITEM,
    value
})
export const deleteItemAction = (value) => ({
    type: DELETE_ITEM,
    value
})
// 字符串方法
// indexOf()方法
export const strChange = (value) => ({
    type: STR_CHANGE,
    value
})
// slice()方法

export const addSlicex = (value) => ({
    type: ADD_SLICEX,
    value
})
export const addSlicey = (value) => ({
    type: ADD_SLICEY,
    value
})
export const sliceChange = (value) => ({
    type: SLICE_CHANGE,
    value
})